import {memo} from "react";

const SlowPastUl = memo(function SlowPastUl(){
    const items = []
    for(let i=0; i<500; i++){
        items.push(<SlowPastLi key={i} index={i} />)
    }
    return(
        <ul>{items}</ul>
    )

})

function SlowPastLi({index}) {

  const startTime:number = performance.now();
  while (performance.now() - startTime < 3) {
    // do nothing
  }
  return <li>Slow Past #{index}</li>;
}

export default SlowPastUl;